package file;

import java.io.*;

public class BufferedWriter {
    public static void main(String[] agrs){
        File file=new File("e:\\cn.txt");
        try {
            java.io.BufferedWriter bw=new java.io.BufferedWriter(new FileWriter(file));
            bw.write("昆明华信智原");
            bw.newLine();//写入一个行分隔符
            bw.write("万科学府12楼");
            bw.close();
            BufferedReader br=new BufferedReader(new FileReader(file));
            String s=br.readLine();//
            while (s!=null){
                System.out.println(s);
                s=br.readLine();
            }
            br.close();
            PrintWriter out=new PrintWriter(file);
            out.print(3.1415926);
            out.write("中国馆");
            out.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}
